<template>
  <div class="favorite">
    <van-nav-bar title="收藏列表">
      <template #left>
        <van-icon color="#fff" name="arrow-left" @click="$router.back()" />
      </template>
    </van-nav-bar>
    <my-list-item :row="item" v-for="item in list" :key="item.id"/>
  </div>
</template>

<script>
import MyListItem from '@/components/MyListItem.vue'
import { createNamespacedHelpers } from 'vuex'
const { mapState, mapActions } = createNamespacedHelpers('favorite')
export default {
  components: { MyListItem },
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['list'])
  },
  created () {
    this.loadList()
  },

  methods: {
    ...mapActions(['loadList'])
  }
}
</script>

<style scoped lang="less"></style>
